//#define _CRT_SECURE_NO_WARNINGS 1

//#include <iostream>
//#include <string>
//using namespace std;
//
//int main()
//{
//	struct DATA
//	{
//		int year;
//		int month;
//		int day;
//	};
//	struct student
//	{
//		int num;
//		string name;
//		string sec;
//		DATA data;
//		double score;
//	};
//	student student1;
//	student student2;
//	student2.num = 101;
//	student2.name = "liwan";
//	student2.sec = "w";
//	student2.data.year = 1993;
//	student2.data.month = 03;
//	student2.data.day = 13;
//	student2.score = 79.9;
//	cout << student2.num<<" "<<student2.name<<" " <<
//		student2.sec<<" " << student2.data.year << "-"<< 
//		student2.data.month<<"-"<<student2.data.day<<" "<<student2.score<<endl;
//	student1 = student2;
//	cout << student1.num << " " << student1.name << " " <<
//		student1.sec << " " << student1.data.year << "-" <<
//		student1.data.month << "-" << student1.data.day << " " << student1.score << endl;
//	return 0;
//}

//#include <iostream>
//#include <string>
//using namespace std;
//int main()
//{
//	struct leader
//	{
//		string name[3];
//		int num[3];
//	};
//	leader pep;
//	pep.name[0] = "zhaotian";
//	pep.num[0] = 0;
//	pep.name[1] = "sunzi";
//	pep.num[1] = 0;
//	pep.name[2] = "wangwu";
//	pep.num[2] = 0;
//	int i = 0;
//	string mm;
//	for (i = 0; i < 10; i++)
//	{
//		cin >> mm;
//		for (int j = 0; j < 3; j++)
//		{
//			if (mm == pep.name[j])
//			{
//				pep.num[j]++;
//			}
//		}
//	}
//	for (int j = 0; j < 3; j++)
//	{
//		cout << pep.name[j] << " "<<pep.num[j]<<endl;
//	}
//
//	return 0;
//}

//#include <iostream>
//#include <string>
//using namespace std;
//
//int main()
//{
//	struct DATA
//	{
//		int year;
//		int month;
//		int day;
//	};
//	struct student
//	{
//		int num;
//		string name;
//		string sec;
//		DATA data;
//		double score;
//	};
//	student *s;
//	student student2;
//	student2.num = 101;
//	student2.name = "liwan";
//	student2.sec = "w";
//	student2.data.year = 1993;
//	student2.data.month = 03;
//	student2.data.day = 13;
//	student2.score = 79.9;
//	cout << student2.num<<" "<<student2.name<<" " <<
//		student2.sec<<" " << student2.data.year << "-"<< 
//		student2.data.month<<"-"<<student2.data.day<<" "<<student2.score<<endl;
//	s = &student2;
//	cout << s->num << " " << s->name << " " <<
//		s->sec << " " << s->data.year << "-" <<
//		s->data.month << "-" << s->data.day << " " << s->score << endl;
//	return 0;
//}

//#include <iostream>
//#include <string>
//using namespace std;
//int main()
//{
//	struct studentdat
//	{
//		int num;
//		double score;
//		struct studentdat* next;
//	};
//	studentdat stu1, stu2, stu3;
//	studentdat* head=NULL;
//	stu1.num = 31001;
//	stu1.score = 89.5;
//	stu1.next = &stu2;
//	head = &stu1;
//	stu2.num = 31003;
//	stu2.score = 90;
//	stu2.next = &stu3;
//	stu3.num = 31007;
//	stu3.score = 85;
//	stu3.next = NULL;
//	while (head)
//	{
//		cout << head->num << " " << head->score << endl;
//		head = head->next;
//	}
//	return 0;
//}

//#include <iostream>
//#include <string>
//using namespace std;
//
//struct studentdat
//{
//	string name;
//	int num;
//	double score;
//};
//void print(studentdat* s1)
//{
//	cout <<s1->name<<" " <<s1->num << " " << s1->score << endl;
//}
//int main()
//{
//	studentdat stu1;
//	stu1.num = 31001;
//	stu1.score = 89.5;
//	stu1.name = "wopo";
//	print(&stu1);
//
//	return 0;
//}

//#include <iostream>
//#include <string>
//using namespace std;
//
//struct studentdat
//{
//	string name;
//	int num;
//	double score;
//};
//void print(studentdat& s1)
//{
//	cout << s1.name << " " << s1.num << " " << s1.score << endl;
//}
//int main()
//{
//	studentdat stu1;
//	stu1.num = 31001;
//	stu1.score = 89.5;
//	stu1.name = "wopo";
//	print(stu1);
//
//	return 0;
//}

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	enum ball
	{
		red,
		yellow,
		blue,
		white,
		black
	};
	
	ball b1, b2, b3,b;
	int count = 0;
	for (int i = 0; i < 5; i++)
	{
		b1 = (ball)i;
		for (int j = 0; j < 5; j++)
		{
			b2 = (ball)j;
			if (b2 == b1)
			{
				continue;
			}
			else
			{
				for (int k = 0; k < 5; k++)
				{
					b3 = (ball)k;
					if (b3 == b2 || b3 == b1)
					{
						continue;
					}
					else
					{
						count++;
						cout << count << ":";
						for (int loop = 1; loop < 4; loop++)
						{
							switch (loop)
							{
							case 1:b = b1; break;
							case 2:b = b2; break;
							case 3:b = b3; break;
							default:break;
							}
							switch (b)
							{
							case red:cout << setw(8) << "red"; break;
							case yellow:cout << setw(8) << "yellow"; break;
							case blue:cout << setw(8) << "blue"; break;
							case white:cout << setw(8) << "white"; break;
							case black:cout << setw(8) << "black"; break;
							default:break;
							}
						}
						cout << endl;
						//cout << count << ":" << b1 << " " << b2 << " " << b3 << endl;
					}
				}
			}
		}
	}
	cout << "total:" << count << endl;
	return 0;
}